/**
  ******************************************************************************
  * @file    bsp_gpio.cpp
  * @author  
  * @version V1.0
  * @date    2017-xx-xx
  * @brief   
  ******************************************************************************
  * @attention
  *
  *
  ******************************************************************************
  */
	
#include	"bsp_gpio.h"

cGPIO::cGPIO(GPIO_TypeDef* GPIOx, uint16_t GPIO_Pin)
{
	port = GPIOx;
	pin = GPIO_Pin;
}

void	cGPIO::OutputLow(void)
{
	GPIO_ResetBits(port, pin);
}

void	cGPIO::OutputHigh(void)
{
	GPIO_SetBits(port, pin);
}

void	cGPIO::OutputToggle(void)
{
	GPIO_ToggleBits(port, pin);
}

uint8_t	cGPIO::InputStatus(void)
{
	return GPIO_ReadInputDataBit(port, pin);
}
